// Package config 站点配置信息
package config

import "gitee.com/sweetsunnyflower/carpooling-server-go/pkg/config"

func init() {
	config.Add("wechat", func() map[string]interface{} {
		return map[string]interface{}{

			// 默认是 Mailhog 的配置
			"miniprogram": map[string]interface{}{
				"appid":  config.Env("WECHAT_MINIPROGRAM_APPID", ""),
				"secret": config.Env("WECHAT_MINIPROGRAM_SECRET", ""),
			},

			"payment": map[string]interface{}{
				"appid":       config.Env("WECHAT_MINIPROGRAM_APPID", ""),
				"mchid":       config.Env("WECHAT_MCHID", ""),
				"certpath":    config.Env("WECHAT_PAYMENT_CERTPATH", ""),
				"keypath":     config.Env("WECHAT_PAYMENT_KEYPATH", ""),
				"notifyurl":   config.Env("WECHAT_PAYMENT_NOTIFY_URL", ""),
				"serialno":    config.Env("WECHAT_PAYMENT_SERIALNO", ""),
				"key":         config.Env("WECHAT_PAYMENT_KEY", ""),
				"mchapiv3key": config.Env("WECHAT_PAYMENT_MCHAPIV3KEY", ""),
			},
			"offiaccount": map[string]interface{}{
				"appid":     config.Env("WECHAT_OFFIACCOUNT_APPID", ""),
				"appsecret": config.Env("WECHAT_OFFIACCOUNT_SECRET", ""),
			},
			"log": config.Env("WECHAT_LOG", "./storage/logs/wechat.log"),
			"templatesid": map[string]interface{}{
				"cancel_trip_id": config.Env("WECHAT_CANCEL_TRIP_TEMPLATE_ID", ""),
			},
		}
	})
}
